SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[VersionesInsertCommand]
(
	@ID numeric(10, 0),
	@VERSION varchar(50),
	@ACTIVO bit
)
AS
	SET NOCOUNT OFF;
DECLARE @I NUMERIC(10,0) = (SELECT(ISNULL(MAX([VERSIONES].ID),0))+1 FROM [VERSIONES]);	

INSERT INTO [VERSIONES] ([ID], [VERSION], [ACTIVO]) VALUES (@I, @VERSION, @ACTIVO);
	
SELECT ID, VERSION, ACTIVO FROM VERSIONES WHERE (ID = @I)
GO
